package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.pojo.Announcement;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AnnouncementsMapper extends BaseMapper<Announcement> {
    @Select("SELECT * FROM `tb_announcement` LIMIT #{page}, #{pagesize}")
    List<Announcement> getAnnouncements(@Param("page") Integer page, @Param("pagesize") Integer pagesize);
}
